﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="CustomerEquipment.aspx.cs" Inherits="VSM.CustomerEquipment" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function isNumberKey(sender, evt) {
            var txt = sender.value;
            var dotcontainer = txt.split('.');
            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (!(dotcontainer.length == 1 && charCode == 46) && charCode > 31 && (charCode < 48 || charCode > 57))
                return false;

            return true;
        }
        function OpenItemPopup() {
            var supplier = $("#<%= txtVendorCode.ClientID %>").val();

            var url = "../../ItemPopup.aspx?Supplier=" + supplier
            Main.openCustomDialog(url, 600, 610);
        }
        function OpenVendor() {

            var url = "../../VendorPopup.aspx";
            Main.openCustomDialog(url, 600, 610);
        }
    </script>
    <div>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:HiddenField ID="hdnIsUpdate" runat="server" />
                <asp:HiddenField ID="hdnStatus" runat="server" />
                <h2>
                    &nbsp;<asp:Label ID="lblTitle" runat="server" Text="Customer Equipment Card"></asp:Label>
                </h2>
                <div style="margin-left: 5px; width: 99%;">
                    <hr />
                    <table border="0" width="100%" style="background-color: #D1D4D8; font-weight: bold;">
                        <tr>
                            <td>
                                Mfr Serial No:
                            </td>
                            <td style="width: 450px">
                                <asp:TextBox ID="txtVendorName0" runat="server" Width="250px"></asp:TextBox>
                            </td>
                            <td style="width: 100px">
                                Status:</td>
                            <td align="left">
                                <asp:DropDownList ID="ddl_Status" runat="server">
                                    <asp:ListItem Value="0">Active</asp:ListItem>
                                    <asp:ListItem Value="1">Returned</asp:ListItem>
                                    <asp:ListItem Value="2">Terminated</asp:ListItem>
                                    <asp:ListItem Value="3">Loaned</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Serial&nbsp; No:
                            </td>
                            <td style="width: 450px">
                                <asp:TextBox ID="txtVendorName1" runat="server" Width="250px">S1-000055</asp:TextBox>
                            </td>
                            <td style="width: 100px">
                                Previous SN:</td>
                            <td align="left">
                                <asp:TextBox ID="txtPreviousSN" runat="server" Width="150px" ></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 150px">
                                Item:</td>
                            <td style="width: 450px" >
                                <asp:TextBox ID="txtVendorCode0" runat="server" BackColor="#E6E6E6" ReadOnly="True" Width="96px">S10000</asp:TextBox>
                                <asp:TextBox ID="txtVendorName2" runat="server" Width="250px">Server Point 10000</asp:TextBox>
                                <asp:Button ID="btnSelectVendor1" runat="server" 
                                    OnClientClick="OpenVendor(); return false;" 
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat; font-weight: bold" 
                                    Text="..." />
                            </td>
                            <td>
                                New SN:</td>
                            <td>
                                <asp:TextBox ID="txtNewSN" runat="server" Width="150px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Customer:
                            </td>
                            <td colspan="2">
                                <asp:TextBox ID="txtVendorCode" runat="server" BackColor="#E6E6E6" ReadOnly="True"
                                    Width="96px">C60000</asp:TextBox>
                                <asp:TextBox ID="txtVendorName" runat="server" Width="250px">SG Electronics</asp:TextBox>
                                <asp:Button ID="btnSelectVendor0" runat="server" OnClientClick="OpenVendor(); return false;"
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;
                                    font-weight: bold" Text="..." />
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Contact Person:
                            </td>
                            <td style="width: 450px">
                                <asp:TextBox ID="txtConpersonName" runat="server" Width="368px">Eric Alexander</asp:TextBox>
                            </td>
                            <td>Tel. No.</td>
                            <td>
                                <asp:TextBox ID="txtTelephoneNo" runat="server" Width="150px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Technician:</td>
                            <td style="width: 450px">
                                <asp:DropDownList ID="DropDownList6" runat="server">
                                </asp:DropDownList>
                            </td>
                            <td>Territory</td>
                            <td>
                                <asp:DropDownList ID="DropDownList7" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <cc1:TabContainer ID="TabContainer1" runat="server" Width="100%" 
                                    ActiveTabIndex="0">
                                    <cc1:TabPanel ID="tabAddress" runat="server">
                                        <HeaderTemplate>
                                            Address</HeaderTemplate>
                                        <ContentTemplate>
                                            <table border="0" width="100%" style="background-color: #D1D4D8; font-weight: bold;">
                                                <tr>
                                                    <td style=" width: 15%; ">Street:</td>
                                                    <td style=" width: 25%; ">
                                                        <asp:TextBox ID="txtStreet" runat="server" Width="150px"></asp:TextBox>
                                                    </td>
                                                    <td valign="top" rowspan="9">Location:</td>
                                                    <td style=" width: 50%; " valign="top" rowspan="9" >
                                                        <asp:TextBox ID="txtAddress" Height="100px" Width="100%" TextMode="MultiLine" runat="server" Text="39 Đường Cô Giang, Phường Cô Giang, Quận 1, Tp.HCM" ></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Street No.:</td>
                                                    <td>
                                                        <asp:TextBox ID="txtStreetNo" runat="server" Width="150px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Building/Floor/Room:</td>
                                                    <td>
                                                        <asp:TextBox ID="txtBFR" runat="server" Width="150px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Zip Code:</td>
                                                    <td>
                                                        <asp:TextBox ID="txtZipCode" runat="server" Width="150px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Block:</td>
                                                    <td>
                                                        <asp:TextBox ID="txtBlock" runat="server" Width="150px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>City:</td>
                                                    <td>
                                                        <asp:TextBox ID="txtCity" runat="server" Width="150px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>State:</td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlState" runat="server" Width="150px"></asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>County:</td>
                                                    <td>
                                                        <asp:TextBox ID="txtCounty" runat="server" Width="150px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Country:</td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlCountry" runat="server" Width="150px"></asp:DropDownList>
                                                    </td>
                                                </tr>
                                            </table>                                        
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabServiceCall" runat="server">
                                        <HeaderTemplate>
                                            Service Call</HeaderTemplate>
                                        <ContentTemplate>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabServiceContracts" runat="server">
                                        <HeaderTemplate>
                                            Service Contracts</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:Image ID="Image4" runat="server" />
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabHSalesData" runat="server">
                                        <HeaderTemplate>
                                            Sales Data</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:Image ID="Image5" runat="server" />
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabTransaction" runat="server">
                                        <HeaderTemplate>
                                            Transactions</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:Image ID="Image6" runat="server" />
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                </cc1:TabContainer>
                            </td>
                        </tr>
                    </table>
                    <hr />
                </div>
                <table width="100%" border="0">
                    <tr>
                        <td colspan="2">
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 400px;">
                                        <asp:Button ID="btnSaveDraft" runat="server" Text="Save" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" OnClick="btnSaveDraft_Click" BorderStyle="Solid" />
                                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" BorderStyle="Solid" OnClick="btnCancel_Click" />
                                    </td>
                                    <td>
                                        <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
